Skip to content

Sync Upsun skill with latest configuration guidance (a38676782c33)#20

Closed
ganeshdipdumbare wants to merge 1 commit intomainfrom
auto/sync-upsun-skill-a38676782c33-3651543
Closed

Sync Upsun skill with latest configuration guidance (a38676782c33)#20
ganeshdipdumbare wants to merge 1 commit intomainfrom
auto/sync-upsun-skill-a38676782c33-3651543

Conversation

@ganeshdipdumbare
Copy link
Copy Markdown
Contributor

Automated sync of the Upsun skill with configuration guidance in the internal platformsh/ai repository.

Signature: a38676782c33

Rationale (from the generator): 28 reference file(s) generated/updated (0 NO_UPDATES/errors); core: Add per-framework cross-links so agents can consult framework-specific reference files when generating or editing Upsun configs.

Files changed:

  • plugins/upsun/skills/upsun/SKILL.md
  • plugins/upsun/skills/upsun/references/directus.md
  • plugins/upsun/skills/upsun/references/django.md
  • plugins/upsun/skills/upsun/references/drupal.md
  • plugins/upsun/skills/upsun/references/echo.md
  • plugins/upsun/skills/upsun/references/express.md
  • plugins/upsun/skills/upsun/references/flask.md
  • plugins/upsun/skills/upsun/references/gatsby.md
  • plugins/upsun/skills/upsun/references/gin.md
  • plugins/upsun/skills/upsun/references/go.md
  • plugins/upsun/skills/upsun/references/hugo.md
  • plugins/upsun/skills/upsun/references/jekyll.md
  • plugins/upsun/skills/upsun/references/js.md
  • plugins/upsun/skills/upsun/references/laravel.md
  • plugins/upsun/skills/upsun/references/nextjs.md
  • plugins/upsun/skills/upsun/references/nuxt.md
  • plugins/upsun/skills/upsun/references/php.md
  • plugins/upsun/skills/upsun/references/python.md
  • plugins/upsun/skills/upsun/references/rails.md
  • plugins/upsun/skills/upsun/references/reactjs.md
  • plugins/upsun/skills/upsun/references/ruby.md
  • plugins/upsun/skills/upsun/references/sinatra.md
  • plugins/upsun/skills/upsun/references/static.md
  • plugins/upsun/skills/upsun/references/strapi.md
  • plugins/upsun/skills/upsun/references/sylius.md
  • plugins/upsun/skills/upsun/references/symfony.md
  • plugins/upsun/skills/upsun/references/vite.md
  • plugins/upsun/skills/upsun/references/vuejs.md
  • plugins/upsun/skills/upsun/references/wordpress.md

This PR was opened automatically. Please review for voice and accuracy before merging — the generator may occasionally over-reach. If the changes aren't wanted, close the PR; a subsequent run will open a FRESH PR on a new branch (the closed PR stays closed). A new PR will also be opened automatically when the source guidance changes or when upstream drifts.

Copilot AI review requested due to automatic review settings April 21, 2026 13:00
@ganeshdipdumbare
Copy link
Copy Markdown
Contributor Author

closing it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Syncs the Upsun skill’s framework guidance with updated internal configuration references, adding per-framework cross-links and new reference templates to help agents generate/adjust .upsun/config.yaml appropriately.

Changes:

  • Added a “Per-framework references” index to the Upsun skill.
  • Added new framework/language reference docs (PHP, Python, Node.js, CMSes, and several frontend frameworks).
  • Added a general static-site guidance reference.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 31 comments.

Show a summary per file
File Description
plugins/upsun/skills/upsun/SKILL.md Adds per-framework reference links for agents and points to the canonical config structure doc.
plugins/upsun/skills/upsun/references/directus.md Adds Directus-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/django.md Adds Django-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/drupal.md Adds Drupal-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/echo.md Adds Echo (Go) guidance and example patterns.
plugins/upsun/skills/upsun/references/express.md Adds Express guidance and an example app config.
plugins/upsun/skills/upsun/references/flask.md Adds Flask guidance and an example app config.
plugins/upsun/skills/upsun/references/gatsby.md Adds Gatsby guidance and an example app config.
plugins/upsun/skills/upsun/references/gin.md Adds Gin (Go) guidance and service examples.
plugins/upsun/skills/upsun/references/go.md Adds general Go guidance and example patterns.
plugins/upsun/skills/upsun/references/hugo.md Adds Hugo static-site guidance and examples (composable image).
plugins/upsun/skills/upsun/references/jekyll.md Adds Jekyll static-site guidance and examples (composable image).
plugins/upsun/skills/upsun/references/js.md Adds base Node.js guidance and example app config.
plugins/upsun/skills/upsun/references/laravel.md Adds Laravel-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/nextjs.md Adds Next.js-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/nuxt.md Adds Nuxt-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/php.md Adds general PHP guidance (build flavor, extensions, env var guidance).
plugins/upsun/skills/upsun/references/python.md Adds general Python guidance across dependency managers (uv/Poetry/Pipenv/pip).
plugins/upsun/skills/upsun/references/rails.md Adds Rails-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/reactjs.md Adds React guidance and example configuration blocks.
plugins/upsun/skills/upsun/references/ruby.md Adds general Ruby guidance (DB URL, workers, mounts).
plugins/upsun/skills/upsun/references/sinatra.md Adds Sinatra-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/static.md Adds generic static-site guidance (composable images + standard runtime).
plugins/upsun/skills/upsun/references/strapi.md Adds Strapi-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/sylius.md Adds Sylius-specific Upsun configuration guidance and example.
plugins/upsun/skills/upsun/references/symfony.md Adds Symfony-specific Upsun configuration guidance and examples (incl. SQLite).
plugins/upsun/skills/upsun/references/vite.md Adds Vite static build guidance and example config.
plugins/upsun/skills/upsun/references/vuejs.md Adds Vue static build guidance and example config.
plugins/upsun/skills/upsun/references/wordpress.md Adds WordPress guidance (Bedrock/standard) and a full example config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

FLASK_ENV: production

relationships:
db: {}
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relationships entries should bind to a service endpoint (string form), not an empty mapping. The canonical structure in references/config.md uses e.g. relationships: database: 'db:postgresql' (config.md:64). Update this example to bind db to the db service endpoint.

Suggested change
db: {}
db: "db:postgresql"

Copilot uses AI. Check for mistakes.
Comment on lines +43 to +44
export ADMIN_EMAIL='admin@example.com'
export ADMIN_PASSWORD='password'
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The deploy hook hard-codes default admin credentials (admin@example.com / password). Even if this is “first deploy only”, it’s an insecure default that can be accidentally exposed. Prefer generating a random password, requiring explicit env vars, or documenting a manual bootstrap step instead of committing defaults.

Suggested change
export ADMIN_EMAIL='admin@example.com'
export ADMIN_PASSWORD='password'
: "${ADMIN_EMAIL:?Set ADMIN_EMAIL in the environment before first deploy}"
: "${ADMIN_PASSWORD:?Set ADMIN_PASSWORD in the environment before first deploy}"

Copilot uses AI. Check for mistakes.
Comment on lines +72 to +73
db: {}
redis: {}
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relationships entries should bind to a service endpoint (string form), not an empty mapping. The canonical structure in references/config.md uses e.g. relationships: database: 'db:postgresql' (config.md:64). Update this example to use the correct relationship binding for db and redis.

Suggested change
db: {}
redis: {}
db: 'db:postgresql'
redis: 'redis:redis'

Copilot uses AI. Check for mistakes.
Comment on lines +28 to +35
cat > .environment << EOF
NODE_ENV=production
DATABASE_CLIENT=postgres
APP_KEYS=$PLATFORM_PROJECT_ENTROPY
API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY
ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY
TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY
JWT_SECRET=$PLATFORM_PROJECT_ENTROPY
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .environment file is written with unquoted heredoc (<< EOF), so $PLATFORM_PROJECT_ENTROPY will be expanded immediately and any relationship vars (if added later) would be empty because build hooks have no service env. Also, these assignments aren’t exported, so they won’t reach the npm start process. Use a quoted heredoc and export … lines (or append export statements via echo 'export …' >> .environment).

Suggested change
cat > .environment << EOF
NODE_ENV=production
DATABASE_CLIENT=postgres
APP_KEYS=$PLATFORM_PROJECT_ENTROPY
API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY
ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY
TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY
JWT_SECRET=$PLATFORM_PROJECT_ENTROPY
cat > .environment <<'EOF'
export NODE_ENV=production
export DATABASE_CLIENT=postgres
export APP_KEYS=$PLATFORM_PROJECT_ENTROPY
export API_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY
export ADMIN_JWT_SECRET=$PLATFORM_PROJECT_ENTROPY
export TRANSFER_TOKEN_SALT=$PLATFORM_PROJECT_ENTROPY
export JWT_SECRET=$PLATFORM_PROJECT_ENTROPY

Copilot uses AI. Check for mistakes.
passthru: true

relationships:
database: {}
Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

relationships entries should bind to a service endpoint (string form), not an empty mapping. The canonical structure in references/config.md uses e.g. relationships: database: 'db:postgresql' (config.md:64). Update this example to bind database to the database service endpoint.

Suggested change
database: {}
database: 'database:postgresql'

Copilot uses AI. Check for mistakes.
applications:
app:
type: php:8.4

Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PHP app example doesn’t set build.flavor: none, which conflicts with the PHP guidance in references/php.md (and other PHP framework references) and can lead to implicit Composer behavior or duplicated installs. Add build: { flavor: none } to keep dependency management explicit.

Suggested change
build:
flavor: none

Copilot uses AI. Check for mistakes.
Comment on lines +57 to +61
hooks:
build: |
set -ex
npm run build

Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “standard runtime image” example also runs npm run build without first installing dependencies. Add npm ci/npm install (or the detected package manager) before the build command so the example is runnable.

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +31
build: |
set -ex
npm ci --omit=dev
npm run build

Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm ci --omit=dev will typically remove the devDependencies that Vite needs to run the build (Vite is usually in devDependencies). This makes npm run build fail for most Vite projects. Install dev deps for the build (e.g. npm ci) and, if needed, prune afterwards (or rely on a static runtime with no node_modules at runtime).

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +55
YAML example (Vite):
runtime:
node: "22"
build:
install_command: "npm ci"
build_command: "npm run build"
output_dir: "dist"
static:
directory: "dist"
spa_fallback: "index.html"

- Create React App (build output: build/):

YAML example (CRA):
runtime:
node: "22"
build:
install_command: "pnpm install"
build_command: "pnpm run build"
output_dir: "build"
static:
directory: "build"
spa_fallback: "index.html"

Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “YAML example” blocks here don’t match Upsun’s .upsun/config.yaml schema (they use runtime/build/static keys rather than applications/web/locations). This will mislead users/agents. Rework the examples to use the standard Upsun structure shown in references/config.md (applications + build hook + web.locations serving dist/ or build/ with SPA passthru).

Copilot uses AI. Check for mistakes.
Comment on lines +90 to +92
relationships:
db: {}

Copy link

Copilot AI Apr 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as earlier in the file: relationships: db: {} is not a valid binding in Upsun configs. Use the string binding form shown in references/config.md (config.md:64), e.g. db: 'db:postgresql' / db: 'db:mysql' depending on the service endpoint.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants